package com.example.springaopdemo2.Controller;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.annotation.RestController;import java.util.Random;@RestController@RequestMapping("/user")public class UserController {    @GetMapping("/login")    public String login()    {        System.out.println("执行 login()");        String a = null;        a.hashCode();        return "登陆页面";    }    @GetMapping("/reg")    public String reg()    {        System.out.println("执行 reg()");        int a = 5 / 0;        return "注册页面";    }    @GetMapping("hello")    public String hello()    {        System.out.println("执行 hello()");        return "hello";    }    @RequestMapping("/getnum")    public Integer getNum()    {        return new Random().nextInt(10);    }}